package org.hong.monkey

import java.io.File

/**
 * Resolves paths to files added through `MonkeyContext.addFile()`.
 */
object MonkeyFiles {

  /**
   * Get the absolute path of a file added through `MonkeyContext.addFile()`.
   */
  def get(filename: String): String =
    new File(getRootDirectory(), filename).getAbsolutePath()

  /**
   * Get the root directory that contains files added through `MonkeyContext.addFile()`.
   */
  def getRootDirectory(): String =
    MonkeyEnv.get.monkeyFilesDir

}
